package adminMenuDao

import (
	"gitee.com/yangguoliang001/go-gin-vue3/BO"
	"gitee.com/yangguoliang001/go-gin-vue3/model"
	"gorm.io/gorm"
)

type AdminMenuDao interface {
	WhereMenuIdByAdminId(id int32) (menuIdList []model.AdminMenuDO, err error)
	CreateAdminMenu(adminMenu []BO.AddAdminMenuBO) (err error)
	DeleteAdminMenu(ids []int32) (err error)
	EditAdminMenu(adminMenu []BO.AddAdminMenuBO, ids []int32) (err error)
}

type adminMenuDao struct {
	db *gorm.DB
}

func New(db *gorm.DB) AdminMenuDao {
	return &adminMenuDao{
		db: db,
	}
}
